#ifndef _GENOPTION_
#define _GENOPTION_

#include <iostream>
#include <vector>
#include <opencv2/opencv.hpp>
#include <eigen3/Eigen/Eigen>
#include "base/cmvs/bundle.h"
#include "base/cmvs/graclus.h"
#include "base/numeric/vec4.h"
#include "base/numeric/vec3.h"

class inputData
{
public:
    inputData(){m_camera=Eigen::MatrixXd(3,3);scale=1;}
    ~inputData(){}

    void getInputFile(const std::string orimage, const std::string prefix);
    std::vector<Eigen::MatrixXd > &getP();
    CMVS::Cbundle &getBundle(void);

protected:
    void getImage(const std::string in, const std::string out);
    void readCameraFile(const std::string file);
    void readCameraFile(std::vector<double> camerap);
    void getbundleFile(const string in);
    void getbundleFile(std::vector<Eigen::MatrixXd> r, std::vector<Eigen::MatrixXd> t, std::vector<std::vector<int> > vpoints,
                       std::vector<std::vector<int> > visibles,std::vector<Vec3f> colors, std::vector<Vec4f> coords);
    float computeP();
    void getallFile(std::string path);

protected:
    double scale;
    std::vector<Eigen::MatrixXd>        m_rtran;
    std::vector<Eigen::MatrixXd >       m_pose;
    Eigen::MatrixXd                     m_camera;
    CMVS::Cbundle                       m_bundle;
};
#endif
